﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>ListHotkeys - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The ListHotkeys function displays the hotkeys in use by the current script, whether their subroutines are currently running, and whether they use a hook." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>ListHotkeys</h1>

<p>显示当前脚本使用的热键, 不论它们的子程序当前是否运行, 也不论它们是否使用<a href="InstallKeybdHook.htm">键盘</a>或<a href="InstallMouseHook.htm">鼠标</a>钩子.</p>

<pre class="Syntax"><span class="func">ListHotkeys</span></pre>
<p>此函数等同于在主窗口中选择 View-&gt;Hotkeys 菜单项.</p>
<p>如果某个热键已被 <a href="Hotkey.htm">Hotkey</a> 函数禁用, 则在列表中它会显示为 OFF 或 PART("PART" 意思是此热键有某些<a href="Hotkey.htm#variant">变体</a>被禁用了).</p>
<p>如果热键的任何变体使用了非 0 级别的 <a href="_InputLevel.htm">#InputLevel</a>, 将显示此级别(或最小及最大级别).</p>
<p>如果任何热键的子程序当前正在运行, 则显示该热键的线程总数.</p>
<p>最后, 还会显示热键的类型, 为下列的其中一个:</p>
<ul>
  <li>reg: 此热键是通过操作系统的 RegisterHotkey() 函数来实现的.</li>
  <li>reg(no): 与上面相同, 不过热键当前不可用(由于不支持, 被禁用或<a href="Suspend.htm">挂起</a>).</li>
  <li>k-hook: 此热键是通过<a href="InstallKeybdHook.htm">键盘钩子</a>来实现的.</li>
  <li>m-hook: 此热键是通过<a href="InstallMouseHook.htm">鼠标钩子</a>来实现的.</li>
  <li>2-hooks: 此热键需要以上两种钩子.</li>
  <li>joypoll: 此热键是通过定期轮询操纵杆来实现的.</li>
</ul>

<h2 id="Related">相关</h2>
<p><a href="InstallKeybdHook.htm">InstallKeybdHook</a>, <a href="InstallMouseHook.htm">InstallMouseHook</a>, <a href="_UseHook.htm">#UseHook</a>, <a href="KeyHistory.htm">KeyHistory</a>, <a href="ListLines.htm">ListLines</a>, <a href="ListVars.htm">ListVars</a>, <a href="_MaxThreadsPerHotkey.htm">#MaxThreadsPerHotkey</a>, <a href="../misc/A_MaxHotkeysPerInterval.htm">A_MaxHotkeysPerInterval</a></p>

<h2 id="Examples">示例</h2>
<div class="ex" id="ExBasic">
<p><a class="ex_number" href="#ExBasic"></a> 显示当前脚本使用的热键信息.</p>
<pre>ListHotkeys</pre>
</div>

</body>
</html>